﻿using System.Runtime.Serialization;
using System.ServiceModel;

namespace ContosoDashboard.Web
{
    [ServiceContract(CallbackContract = typeof(IClientNotificationService))]
    public interface IContosoService
    {
        [OperationContract(IsOneWay = true)]
        void Subscribe();
    }

    [ServiceContract]
    public interface IClientNotificationService
    {
        [OperationContract(IsOneWay = true)]
        void SendUpdate(CustomerInfo Customer);
    }

    [DataContract]
    public class CustomerInfo
    {
        [DataMember]
        public long Id { get; set; }

        [DataMember]
        public string Name { get; set; }

        [DataMember]
        public string Phone { get; set; }

        [DataMember]
        public string City { get; set; }

        [DataMember]
        public string Email { get; set; }
    }
}
